/**
 * SommeListenerImp.java
 */
package com.pluginsacceptor.plugin.formula.MathsTrigo;

import com.pluginsacceptor.plugin.formula.MathsTrigo.support.DataListener;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.DataSender;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.MathData;

/**
  */
public class SommeListenercalcul extends AbstractListener {

    /**
     * Constructor
     * @param dataListener
     * @param dataSender
     */
    public SommeListenercalcul(final DataListener dataListener, final DataSender dataSender) {
        super(dataListener, dataSender);
    }

    @Override
    protected  double calculate() {
    	final MathsTrigo mtg = new MathsTrigo();
    	final double result = mtg.somme(MathData.silentParse(this.getUserData()));
		return  result;

    }
}


